<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>可爱的猫猫图片 - 王three个人网站</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
            color: #333;
            padding: 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        
        header {
            background: linear-gradient(135deg, #2c3e50 0%, #4a6491 100%);
            color: white;
            padding: 25px 30px;
            position: relative;
            text-align: center;
        }
        
        .back-btn {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s;
            text-decoration: none;
            font-size: 14px;
        }
        
        .back-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }
        
        h1 {
            text-align: center;
            font-size: 2.2rem;
            margin: 0;
        }
        
        .cats-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 5px;
            padding: 5px;
        }
        
        .cat-item {
            overflow: hidden;
            position: relative;
            aspect-ratio: 1;
        }
        
        .cat-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        
        .cat-item:hover .cat-image {
            transform: scale(1.05);
        }
        
        footer {
            text-align: center;
            padding: 20px;
            background-color: #2c3e50;
            color: white;
        }
        
        @media (max-width: 768px) {
            .cats-container {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            }
            
            h1 {
                font-size: 1.8rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <a href="../index.html" class="back-btn">←返回首页</a>
            <h1>可爱的猫猫图片</h1>
        </header>
        
        <div class="cats-container">
            <!-- 猫猫图片 1 -->
            <div class="cat-item">
                <img src="../images/cat1.jpg" alt="猫猫图片" class="cat-image">
            </div>
            
            <!-- 猫猫图片 2 -->
            <div class="cat-item">
                <img src="../images/cat2.jpg" alt="猫猫图片" class="cat-image">
            </div>
            
            <!-- 猫猫图片 3 -->
            <div class="cat-item">
                <img src="../images/cat3.jpg" alt="猫猫图片" class="cat-image">
            </div>
        </div>
        
        <footer>
            <p>© 2025 王three个人网站 - 可爱的猫猫图片</p>
        </footer>
    </div>

    <script>
        // 图片加载错误处理
        document.querySelectorAll('.cat-image').forEach(img => {
            img.onerror = function() {
                this.src = "../images/error.png";
            };
        });
        
        // 添加图片点击放大功能
        document.querySelectorAll('.cat-item').forEach(item => {
            item.addEventListener('click', function() {
                const img = this.querySelector('.cat-image');
                const overlay = document.createElement('div');
                overlay.style.position = 'fixed';
                overlay.style.top = '0';
                overlay.style.left = '0';
                overlay.style.width = '100%';
                overlay.style.height = '100%';
                overlay.style.backgroundColor = 'rgba(0, 0, 0, 0.9)';
                overlay.style.display = 'flex';
                overlay.style.justifyContent = 'center';
                overlay.style.alignItems = 'center';
                overlay.style.zIndex = '1000';
                overlay.style.cursor = 'pointer';
                
                const enlargedImg = document.createElement('img');
                enlargedImg.src = img.src;
                enlargedImg.style.maxWidth = '90%';
                enlargedImg.style.maxHeight = '90%';
                enlargedImg.style.objectFit = 'contain';
                
                overlay.appendChild(enlargedImg);
                document.body.appendChild(overlay);
                
                overlay.addEventListener('click', function() {
                    document.body.removeChild(overlay);
                });
            });
        });
    </script>
</body>
</html>